package com.own.demo.lwf.common.Enum;


 // 错误码枚举类


public enum ErrorNoEnum {
    SUCC(0,"成功"),
    // ========================= 异常 start (1 开头) =============
    // 通用 10 开头
    ERR_UNKNOWN(1000001,"未知异常"),
    ERR_CEP_USC(1000002,"用户中心接口异常"),
    ERR_CEP_BIC(1000003,"基本信息中心接口异常"),
    ERR_PARAM_NULL(1000004,"参数不能为空"),
    ERR_PARAM_EXP(1000007,"参数异常"),
    ERR_CEP_MSG(1000005,"消息中心接口异常"),
    ERR_PARAM(1000006,"单位信息填充错误"),
    ERR_SERVMATTNO_NULL(1000007,"服务事项编号不能为空"),
    ERR_SERVMATTNAME_NULL(1000008,"服务事项名称不能为空"),
    ERR_CRTNODE_NULL(1000009,"当前环节不能为空"),
    ERR_CRTNODENAME_NULL(1000010,"当前环节名称不能为空"),
    ERR_CRTPROSSTAS_NULL(1000011,"当前办理状态不能为空"),
    ERR_SERVMATTNODEINSTID_NULL(1000012,"服务事项环节实例ID不能为空"),
    ERR_SERVMATTINSTID_NULL(1000013,"服务事项实例ID不能为空"),
    ERR_SEQ_NULL(1000014,"顺序号不能为空"),
    ERR_SERVMATTNODENO_NULL(1000015,"服务事项环节编号不能为空"),
    ERR_SERVMATTNODENAME_NULL(1000016,"服务事项环节名称不能为空"),
    ERR_EVTINSTID_NULL(1000017,"事件实例ID不能为空"),
    ERR_EVTNO_NULL(1000018,"事件编号不能为空"),
    ERR_EVTNAME_NULL(1000019,"事件名称不能为空"),
    ERR_NODEINST_NOT_EXITS_NULL(1000020,"服务事项环节实例不存在"),
    ERR_NODEISEQ__NULL(1000021,"服务事项环节序号不能为空"),
    ERR_TASKID__NULL(1000022,"taskId不能为空"),
    ERR_PSNDATA__NULL(1000023,"数据异常,没有人员基本信息"),
    // ========================= 异常 end =========================




    ;
    private Integer code;
    private String msg;

    ErrorNoEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsg(Integer code) {
        for (ErrorNoEnum e : ErrorNoEnum.values()) {
            if (code.intValue()==e.getCode()) {
                return e.getMsg();
            }
        }
        return null;
    }


    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ErrorNoEnum{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
